package PTA;

class Shape
{
    protected int id;
    protected String color;
    public void area(){

    }
    public void volume(){

    }

    public Shape(int id ,String color){
        this.id=id;
        this.color=color;
    }
    public Shape(){

    }
}

class Rectangle extends Shape {
    protected double width;
    protected double height;
    public Rectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }
    public Rectangle(int id, String color, double width, double height) {
        super(id, color);
        this.width = width;
        this.height = height;
    }

    @Override
    public void area() {
        System.out.println(width * height);
    }
}

public class t9 {
    public static void main(String args[]){
        Shape n1=new Rectangle(10.0,5.0);
        n1.area();
        Shape n2=new Rectangle(100,"Red",4.0,6.0);
        n2.area();

    }
}
